import { DiscordID } from '@boticord/common'
import { User } from '@boticord/users-client'
import { Column, Entity, ManyToOne } from 'typeorm'
import { Resource } from './resource.model'

@Entity()
export class ResourceUp extends DiscordID {
  @ManyToOne(() => Resource, r => r.ups)
  declare resource: Resource

  @ManyToOne(() => User, u => u.ups)
  declare user: User

  @Column({ type: 'bigint' })
  declare expires: number
}